<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>计算乘除法，输入两个数，按钮 1 计算乘法，按钮 2 计算除法</title>
	</head>
	<body>
		<input type="text" id="old1">
		<input type="text" id="old2">
		<button onclick="multiplication()">计算乘法</button>
		<button onclick="division()">计算触发</button>
		<input type="text" id="new"/>
		<script type="text/javascript">
			var old1 = document.getElementById('old1')
			var old2 = document.getElementById('old2')
			var New = document.getElementById('new')
			function multiplication() {
				return New.value = old1.value * old2.value
			}
			function division() {
				return New.value = old1.value / old2.value
			}
		</script>
	</body>
</html>
